//
//  LBURLConfig.h
//  app
//
//  Created by LINAICAI on 2017/1/10.
//  Copyright © 2017年 NAICAI LI. All rights reserved.
//

#import <Foundation/Foundation.h>
//把具体的请求URL分开在不同的H文件
//#import "LBResourceURL.h"
//#import "LBUserURL.h"
//#import "LBProjectURL.h"
//#import "LBHomeURL.h"
//#import "LBPaymentURL.h"
//#import "LBIMURL.h"
//#import "LBOSSServiceURL.h"
//#import "LBBidTenderURL.h"
//#import "LBCommonURL.h"
//#import "LBTaskURL.h"
//#import "LBNewResourceURL.h"
/*
 说明，各个api需要部署到不同主机上，所以需要分模块:
 LBURL_HOME:首页api
 LBURL_USER:用户api
 LBURL_RESOURCE:资源api
 LBURL_PROJECT:项目api
 LBURL_OSS:阿里云OSS图片上传api
 LBURL_PAY:支付模块api
 LBURL_IM:即时通讯IM的api
 */
#define LBURL_HOME(n)          [[LBURLConfig sharedManager].homeURL stringByAppendingString:n]
#define LBURL_USER(n)           [[LBURLConfig sharedManager].userURL stringByAppendingString:n]
#define LBURL_RESOURCE(n)   [[LBURLConfig sharedManager].resourceURL stringByAppendingString:n]
#define LBURL_PROJECT(n)     [[LBURLConfig sharedManager].projectURL stringByAppendingString:n]
#define LBURL_OSSNew(n)       [[LBURLConfig sharedManager].ossURL stringByAppendingString:n]
#define LBURL_PAYNew(n)       [[LBURLConfig sharedManager].payURL stringByAppendingString:n]
#define LBURL_IM(n)               [[LBURLConfig sharedManager].imURL stringByAppendingString:n]
#define LBURL_TIM(n)               [[LBURLConfig sharedManager].timURL stringByAppendingString:n]
#define LBURL_TENDER(n)       [[LBURLConfig sharedManager].tenderURL stringByAppendingString:n]
#define LBURL_TASK(n)           [[LBURLConfig sharedManager].taskURL stringByAppendingString:n]
#define LBURL_COMMON(n)      [[LBURLConfig sharedManager].commonURL stringByAppendingString:n]
#define LBURL_RECONRESOURCE(n)   [[LBURLConfig sharedManager].reconResourceURL stringByAppendingString:n]
#define LBURL_JOB(n)   [[LBURLConfig sharedManager].jobURL stringByAppendingString:n]
#define LBURL_ORDER(n)   [[LBURLConfig sharedManager].orderURL stringByAppendingString:n]
#define LBURL_BEE(n)   [[LBURLConfig sharedManager].beeURL stringByAppendingString:n]
#define LBURL_UNIONNUMBER(n)   [[LBURLConfig sharedManager].unionNumberURL stringByAppendingString:n]
#define LBURL_DISCUSES(n) [[LBURLConfig sharedManager].discussesURL stringByAppendingString:n]


typedef NS_OPTIONS(NSUInteger, LBURLENV_CONFIG_TYPE) {
    LBURLENV_CONFIG_TYPE_TEST = 1 << 0,
    LBURLENV_CONFIG_TYPE_DEV = 1 << 1,
    LBURLENV_CONFIG_TYPE_UAT = 1 << 2,
    LBURLENV_CONFIG_TYPE_RELEASE = 1 << 3,
};
@interface LBURLConfig : NSObject
///环境配置
@property(nonatomic , assign , readonly)LBURLENV_CONFIG_TYPE env;

///首页模块接口URL
@property(nonatomic , strong , readonly)NSString *homeURL;
///用户模块接口URL
@property(nonatomic , strong , readonly)NSString *userURL;
///资源模块接口URL
@property(nonatomic , strong , readonly)NSString *resourceURL;
///项目模块接口URL
@property(nonatomic , strong , readonly)NSString *projectURL;
///阿里云OSS模块接口URL
@property(nonatomic , strong , readonly)NSString *ossURL;
///支付模块接口URL
@property(nonatomic , strong , readonly)NSString *payURL;
///融云IM接口URL
@property(nonatomic , strong , readonly)NSString *imURL;
///发包模块接口URL
@property(nonatomic , strong , readonly)NSString *tenderURL;
///任务模块接口URL
@property(nonatomic , strong , readonly)NSString *taskURL;
///通用和字典模块接口URL
@property(nonatomic , strong , readonly)NSString *commonURL;
///新资源模块接口URL
@property(nonatomic , strong , readonly)NSString *reconResourceURL;
///招聘模块接口URL
@property(nonatomic , strong , readonly)NSString *jobURL;
///采购模块接口URL
@property(nonatomic , strong , readonly)NSString *orderURL;
///小蜜模块接口URL
@property(nonatomic , strong , readonly)NSString *beeURL;
///联结号模块接口URL
@property(nonatomic , strong , readonly)NSString *unionNumberURL;
///腾讯云通讯IM的接口URL
@property(nonatomic , strong , readonly)NSString *timURL;
///议标的接口URL
@property(nonatomic , strong , readonly)NSString *discussesURL;

+ (instancetype)sharedManager;
+ (void)setupWithType:(LBURLENV_CONFIG_TYPE)type;
@end
